import request from "@/utils/request";





// 审核(true通过 false拒绝)
export const advertisementApiApplyHandle = ({ advertisementId, handle }) => {
  return request({
    url: `/backAdmin/advertisementApi/apply/handle?handle=${handle}&advertisementId=${advertisementId}`,
    method: "post",
  });
};

// 广告监管详情
export const advertisementApisupervisedetail = (advertisementId) => {
  return request({
    url: `/backAdmin/advertisementApi/supervise/detail?advertisementId=${advertisementId}`,
    method: "get",
  });
};

// 广告图片监管列表
export const advertisementApipicturesuperviselist = (query) => {
  return request({
    url: `/backAdmin/advertisementApi/picture/supervise/list`,
    method: "get",
    params: query,
  });
};

// 广告图片审核列表
export const pictureApplyList = (query) => {
  return request({
    url: `/backAdmin/advertisementApi/picture/apply/list`,
    method: "get",
    params: query,
  });
};

// 广告字幕监管列表
export const advertisementApicharsuperviselist = (query) => {
  return request({
    url: `/backAdmin/advertisementApi/char/supervise/list`,
    method: "get",
    params: query,
  });
};

// 广告字幕审核列表
export const charApplyList = (query) => {
  return request({
    url: `/backAdmin/advertisementApi/char/apply/list`,
    method: "get",
    params: query,
  });
};

// 发布广告
export const advertisementApiPublish = (data) => {
  return request({
    url: `/backAdmin/advertisementApi/publish`,
    method: "post",
    data,
  });
};

// 广告字幕列表
export const listChar = (query) => {
  return request({
    url: "/backAdmin/advertisementApi/char/list",
    method: "get",
    params: query,
  });
};

// 广告图片列表
export const listpicture = (query) => {
  return request({
    url: "/backAdmin/advertisementApi/picture/list",
    method: "get",
    params: query,
  });
};
// 删除广告
export function delNotice(advertisementIdList) {
  return request({
    url: `/backAdmin/advertisementApi/delete?advertisementIdList=${advertisementIdList}`,
    method: "post",
  });
}

// 查询公告详细
export function getNotice(noticeId) {
  return request({
    url: "/system/notice/" + noticeId,
    method: "get",
  });
}

// 新增公告
export function addNotice(data) {
  return request({
    url: "/system/notice",
    method: "post",
    data: data,
  });
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: "/system/notice",
    method: "put",
    data: data,
  });
}
